From: Juergen Gross Date: Mon, 29 Jul 2019 04:36:24 +0000 (+0200) Subject: xen: don't longjmp() after domain_crash() in check_wakeup_from_wait() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~1840 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=3ef59a85411eb7391876bed6f5c7541126e2de25;p=xen.git xen: don't longjmp() after domain_crash() in check_wakeup_from_wait() Continuing on the stack saved by __prepare_to_wait() on the wrong cpu is rather dangerous. Instead of doing so just call the scheduler again as it already is happening in the similar case in __prepare_to_wait() when doing the setjmp() would be wrong. Signed-off-by: Juergen Gross Reviewed-by: Andrew Cooper --- diff --git a/xen/common/wait.c b/xen/common/wait.c index 3fc5f68611..24716e7676 100644 --- a/xen/common/wait.c +++ b/xen/common/wait.c @@ -196,6 +196,11 @@ void check_wakeup_from_wait(void) { gdprintk(XENLOG_ERR, "vcpu affinity lost\n"); domain_crash(curr->domain); + + /* Re-initiate scheduler and don't longjmp(). */ + raise_softirq(SCHEDULE_SOFTIRQ); + for ( ; ; ) + do_softirq(); } /*